<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>登录</title>
	<script src="{{'/js/jquery.min.js'}}"></script>
</head>
<body>

	<form id="user_form" action="{{url('/dologin')}}" method="post">
	<!-- <form id="user_form" method="post"> -->
	<input type="hidden" name="_token" value="{{ csrf_token() }}">
		用户名: <input type="text" name="name" value=""><br><br>
		密  码: <input type="text" name="pwd"  value=""><br><br>
		<input class='btn' type="button" value="提交">
	</form>
	<script>
	$(function(){
		$(".btn").click(function(){

			if($("#user_form input[name=name]").val()== '' || $("#user_form input[name=pwd]").val()== ''){
				alert('用户名或密码不能为空'); 
				return false;
			}
			$("#user_form").submit();
			// window.location.href='/dologin'; 
		});
		
	});

	</script>

</body>
</html>